/**
 * Created by Skipper on 2017/4/21.
 */
export const system_status_flag = {
  0: '离线',
  1: '上线',
  2: '装订',
  52: '待飞',
  3: '起飞',
  4: '爬升',
  5: '航路',
  55: '识别',
  56: '对准',
  6: '下降',
  7: '调整航向',
  11: '着陆',
  12: '紧急停浆',
  13: '自动停浆',
  14: '引导着陆',
  21: '暂停',
  22: '地面导引',
  33: '人工操控',
  34: '遥控',
  35: '失控',
  36: '应急装订',
  65: '降落'
};
export const mission_ack_flag = {
  0: ['任务加载成功'],
  1: ['任务加载失败'],
  2: ['坐标系不支持'],
  3: ['指令不支持'],
  4: ['航路点越界'],
  5: ['非法参数1'],
  6: ['非法参数2'],
  7: ['任务拒绝'],
  8: ['带参数应答'],
  9: ['航路起点位置偏离'],
  10: ['航路距离超程'],
  11: ['设备未就绪'],
  12: ['GPS信号不佳'],
  13: ['正在更新固件']
};
export const command_ack_flag = {
  0: ['执行成功'],
  1: ['临时拒绝'],
  2: ['永久拒绝'],
  3: ['不支持'],
  4: ['执行失败'],
  10: ['非自主状态，起飞失败'],
  11: ['飞机未解锁，起飞失败'],
  12: ['飞控未就绪，起飞失败，请10秒后再试']
};
export const command_ack_flag_name = {
  1: ['起飞指令'],
  2: ['应急着陆'],
  3: ['调参指令'],
  4: ['进入人工操控'],
  5: ['水平人工操控'],
  6: ['高度人工操控'],
  7: ['设置飞行当地坐标偏移'],
  9: ['设置着陆场相对高度差'],
  10: ['XP调试参数'],
  11: ['快速起飞指令'],
  12: ['任务暂停恢复指令'],
  13: ['返回起点指令'],
  14: ['应急停浆指令'],
  15: ['应急减速指令'],
};
export const infosConst = {
  isInfos: false,
  isGPS: false,
  heartbeat: {
    base_mode: 0,
    system_status: 0
  },
  battery_status: {
    time_std_s: '0',
    voltages: '0',
    current_battery: '0',
    battery_life_factor: '0',
    uav_load_factor: '0',
    time_can_fly: '0',
    time_needed: '0',
    flight_time: '0'
  },
  local_position_ned: {
    x: 0,
    y: 0,
    z: 0
  },
  gps_raw: {
    vel_gps2: '0'
  },
  vision_xyz_ned: {
    time_std_s: '0',
    vision_reg_num: '0',
    vision_x_ned: '0',
    vision_y_ned: '0',
    vision_z_ned: '0',
  },
  mission_ack_2: {
    target_uav: 1,
    target_system: 1,
    type: 8,
    count: 1,
    point: [{
      lat: 30.27760124206543,
      lon: 120.00386047363281,
      alt: 25,
      v: 2
    }]
  },
  mission_ack_3: {
    target_uav: 1,
    target_system: 1,
    type: 8,
    count: 2,
    point: [{
      lat: 30.27760124206543,
      lon: 120.00386047363281,
      alt: 25
    }]
  }
};
export const control_icons = {
  icons: {
    mmc: '/mmc.png',
    fc: '/fc.png',
    local: '/local.png',
    '3g': '/3g.png',
    camera: '/camera.png',
    ultrasonic: '/ultrasonic.png',
    camerab1: '/camerab1.png',
    b2: '/mmc.png'
  },
  status: ['ok', 'error'],
  ids: ['mmc', 'fc', 'b2', 'ultrasonic', 'camera', 'camerab1', 'local', '3g']
};
